/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package exceptions;
import javax.ejb.ApplicationException;
/**
 *
 * @author kheirarahali
 */
@ApplicationException(rollback=true)
public class AdopteUnPrestaException extends RuntimeException{
    
    // champs privés
    private int code =0;
    
    // constructeurs
    public AdopteUnPrestaException(){
        super();
    }
    
    public AdopteUnPrestaException(String message){
        super(message);
    }
    
    public AdopteUnPrestaException(String message, Throwable cause){
        super(message, cause);
    }
    
    public AdopteUnPrestaException(Throwable cause){
        super(cause);
    }
    
    public AdopteUnPrestaException(String message, int code){
        super(message);
        setCode(code);
    }
    
    public AdopteUnPrestaException(Throwable cause, int code){
        super(cause);
        setCode(code);
    }
    
    public AdopteUnPrestaException(String message, Throwable cause, int code){
        super(message, cause);
        setCode(code);
    }
    
    // getters et setters 
    public int getCode(){
        return code;
    }
    
    public void setCode(int code){
        this.code = code;
    }
}
